<template>
  <div style="height: 100%;width: 100%; overflow: hidden">
    <!--    个人主页-->
    <div v-if="type==0" class="typeBox">
      <personal-home-pages-pc v-if="screenSize.width>typeScreen"></personal-home-pages-pc>
      <personal-home-pages-mobel v-else></personal-home-pages-mobel>
    </div>
    <!--    个人主页-->
    <!--    别人主页-->
    <div v-else class="typeBox">
      <other-home-pages-pc v-if="screenSize.width>typeScreen"></other-home-pages-pc>
      <other-home-pages-mobel v-else></other-home-pages-mobel>
    </div>
    <!--    别人主页-->
  </div>
</template>
<script>
import personalHomePagesPc from './components/personalHomePagesPc.vue'
import personalHomePagesMobel from './components/personalHomePagesmobel.vue'
import otherHomePagesPc from './components/otherHomePagesPc.vue'
import otherHomePagesMobel from './components/otherHomePagesMobel.vue'

import { mapGetters } from "vuex";

export default {
  components: {
    personalHomePagesPc,
    personalHomePagesMobel,
    otherHomePagesPc,
    otherHomePagesMobel
  },
  computed: {
    ...mapGetters(["screenSize","typeScreen"]),
  },
  data() {
    return {
      type: '0'
    }
  },
  watch:{
    $route(to, from) {
      this.type = to.query.type
      console.log('我是个人页面',this.type,this.$route)
    }
  }

  ,
  mounted() {
    this.type = this.$route.query.type

    console.log('我是个人页面',this.type,this.$route)

  },
  methods: {},
}
</script>
<style lang="scss">
.typeBox{
  height: 100%;
}
</style>
